package org.JWCB.common.core.constants;

public class CacheConstants {

    /**
     * redis中存储的loginKey开头
     */
    public final static String LOGIN_TOKEN_KEY = "logintoken:";

    /**
     * redis中存储的loginKey过期时间
     */
    public final static long LOGIN_TOKEN_EXP = 720L;

    /**
     * 延长的临界值
     */
    public final static Long EXTENDED_CRITICAL_VALUE = 180L;

    /**
     * 手机验证码key
     */
    public static final String PHONE_CODE_KEY = "p:c:";

    /**
     * 手机单日获取验证码次数key
     */
    public static final String CODE_TIME_KEY = "c:t:";

    /**
     * redis中存储的竞赛详情的key
     */
    public static final String EXAM_DETAIL_KEY = "e:d:";

    /**
     * redis中存储的未完赛的竞赛列表的key
     */
    public static final String EXAM_UNFINISHED_LIST_KEY = "e:t:l:";

    /**
     * redis中存储的历史竞赛列表的key
     */
    public static final String EXAM_HISTORY_LIST_KEY = "e:h:l:";

    /**
     * redis中存储的用户竞赛列表的key
     */
    public static final String USER_EXAM_LIST_KEY = "u:e:l:";

    /**
     * redis中存储的userDetail的key
     */
    public static final String USER_INFO_KEY = "u:d:";

    /**
     * 用户单日文件上传次数的key
     */
    public static final String USER_UPLOAD_TIMES_KEY = "u:u:t:";

    /**
     * 题目id列表的key
     */
    public static final String QUESTION_ID_LIST_KEY = "q:i:l:";

    /**
     * 竞赛中的题目列表
     */
    public static final String EXAM_QUESTION_LIST_KEY = "e:q:l:";

    /**
     * 提交代码限制次数key
     */

    public static final String USER_SUBMIT_COUNT_KEY = "u:s:c:";

    /**
     * 用户信息列表key
     */
    public static final String USER_MESSAGE_LIST_KEY = "u:m:l:";

    /**
     * 信息详情key
     */
    public static final String MESSAGE_DETAIL_KEY = "m:d:";

    /**
     * 竞赛排名key
     */
    public static final String EXAM_RANK_LIST_KEY = "e:r:l:";

    /**
     * 竞赛空值超时时间
     */
    public static final Integer EXAM_RANK_LIST_NONE_EXP = 15;

    /**
     * 题目热榜key
     */
    public static final String HOT_QUESTION_LIST_KEY = "q:h:l";

    /**
     * 热榜题目空值标记缓存key
     */
    public static final String HOT_QUESTION_EMPTY_KEY = "q:h:e";

    /**
     * 热榜题目缓存过期时间（分钟）
     */
    public static final long HOT_QUESTION_CACHE_EXPIRE_TIME = 360;


    /**
     * 用户标签
     */
    public static final String QUESTION_TAG_CACHE_LIST_LEY =  "q:t:l:";

    /**
     * 题目标签过期时间 7days
     */
    public static final Long QUESTION_TAG_CACHE_LIST_EXP = 7L;

    /**
     * 题目标签缓存空值
     */
    public static final String QUESTION_TAG_CACHE_NON_VALUE = "jwcb-oj-question-non";

    /**
     * 题目缓存过期时间 30 分钟
     */
    public static final Long QUESTION_TAG_CACHE_NON_VALUE_EXP = 30L;
}
